<div data-controller="page-scroll">
  <%= form.label :body, t(".help"), class: "sr-only" %>
  <div class="mt-1">
    <%= form.text_area :body, rows: 4, required: true, autofocus: true, placeholder: t(".help"), data: {action: "keydown->forms--keyboard-submit#submit"}, class: field_classes(form, :body) %>
  </div>

  <% if local_assigns[:terms] %>
    <div class="py-4 flex space-x-4 justify-between items-center">
      <div class="flex space-x-2">
        <%= form.check_box :hiring_fee_agreement, class: "focus:ring-gray-500 h-4 w-4 text-gray-600 border-gray-300 rounded mt-1" %>
        <span class="text-sm text-gray-600">
          <%= form.label :hiring_fee_agreement, t(".hiring_fee_agreement"), required: true %>

          <% if HiringAgreements::Term.active? %>
            <%= link_to t(".terms"), hiring_agreement_terms_path, target: "_blank", class: "underline font-medium" %>
          <% else %>
            <%= link_to t(".hiring_fee_cta"), pricing_path(anchor: "hiring-fee"), class: "underline font-medium" %>
          <% end %>
        </span>
      </div>
      <%= render SubmitButtonComponent.new(text: t(".submit"), disable_with: t(".sending"), data: {"forms--keyboard-submit-target": "submit"}) %>
    </div>
  <% else %>
    <div class="py-4 flex space-x-4 justify-end items-center">
      <div class="hidden sm:block shrink-0">
        <div data-controller="keyboard-shortcut" data-keyboard-shortcut-visibility-class="hidden" class="hidden text-xs text-gray-500 font-semibold flex space-x-2 items-baseline">
          <span data-keyboard-shortcut-target="mac" class="hidden font-mono">&#x2318</span>
          <span data-keyboard-shortcut-target="windows" class="hidden font-mono">Ctrl</span>
          <span class="font-mono"> + Enter</span>
        </div>
      </div>
      <%= render SubmitButtonComponent.new(text: t(".submit"), disable_with: t(".sending"), data: {"forms--keyboard-submit-target": "submit"}) %>
    </div>
  <% end %>
</div>
